package com.wenlin.myproduction.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author 文琳_377979485@qq.com
 * @time 2021/10/18 0018 上午 8:30
 * @desc 班次选择弹窗的列表显示用到的实体类
 */
public class RosterSelectBean implements Parcelable {

    private String id;
    private String h_id;
    private String d_id;
    private String name;
    private int type;
    private int start_type;
    private String start_time;
    private int end_type;
    private String end_time;
    private String duration;
    private String director;
    private String ctime;
    private int au_id;
    private int is_del;
    private int is_night;

    private boolean selected;//自己加的

    public boolean isSelected() {
        return selected;
    }

    public void setSelected(boolean selected) {
        this.selected = selected;
    }

    public RosterSelectBean() {
    }

    public RosterSelectBean(String id, String name, int start_type, int end_type, String start_time, String end_time, String duration) {
        this.id = id;
        this.name = name;
        this.start_type = start_type;
        this.end_type = end_type;
        this.start_time = start_time;
        this.end_time = end_time;
        this.duration = duration;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getH_id() {
        return h_id;
    }

    public void setH_id(String h_id) {
        this.h_id = h_id;
    }

    public String getD_id() {
        return d_id;
    }

    public void setD_id(String d_id) {
        this.d_id = d_id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getStart_type() {
        return start_type;
    }

    public void setStart_type(int start_type) {
        this.start_type = start_type;
    }

    public String getStart_time() {
        return start_time;
    }

    public void setStart_time(String start_time) {
        this.start_time = start_time;
    }

    public int getEnd_type() {
        return end_type;
    }

    public void setEnd_type(int end_type) {
        this.end_type = end_type;
    }

    public String getEnd_time() {
        return end_time;
    }

    public void setEnd_time(String end_time) {
        this.end_time = end_time;
    }

    public String getDuration() {
        return duration;
    }

    public void setDuration(String duration) {
        this.duration = duration;
    }

    public String getDirector() {
        return director;
    }

    public void setDirector(String director) {
        this.director = director;
    }

    public String getCtime() {
        return ctime;
    }

    public void setCtime(String ctime) {
        this.ctime = ctime;
    }

    public int getAu_id() {
        return au_id;
    }

    public void setAu_id(int au_id) {
        this.au_id = au_id;
    }

    public int getIs_del() {
        return is_del;
    }

    public void setIs_del(int is_del) {
        this.is_del = is_del;
    }

    public int getIs_night() {
        return is_night;
    }

    public void setIs_night(int is_night) {
        this.is_night = is_night;
    }


    public void readFromParcel(Parcel source) {
        this.id = source.readString();
        this.h_id = source.readString();
        this.d_id = source.readString();
        this.name = source.readString();
        this.type = source.readInt();
        this.start_type = source.readInt();
        this.start_time = source.readString();
        this.end_type = source.readInt();
        this.end_time = source.readString();
        this.duration = source.readString();
        this.director = source.readString();
        this.ctime = source.readString();
        this.au_id = source.readInt();
        this.is_del = source.readInt();
        this.is_night = source.readInt();
        this.selected = source.readByte() != 0;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.h_id);
        dest.writeString(this.d_id);
        dest.writeString(this.name);
        dest.writeInt(this.type);
        dest.writeInt(this.start_type);
        dest.writeString(this.start_time);
        dest.writeInt(this.end_type);
        dest.writeString(this.end_time);
        dest.writeString(this.duration);
        dest.writeString(this.director);
        dest.writeString(this.ctime);
        dest.writeInt(this.au_id);
        dest.writeInt(this.is_del);
        dest.writeInt(this.is_night);
        dest.writeByte(this.selected ? (byte) 1 : (byte) 0);
    }

    protected RosterSelectBean(Parcel in) {
        this.id = in.readString();
        this.h_id = in.readString();
        this.d_id = in.readString();
        this.name = in.readString();
        this.type = in.readInt();
        this.start_type = in.readInt();
        this.start_time = in.readString();
        this.end_type = in.readInt();
        this.end_time = in.readString();
        this.duration = in.readString();
        this.director = in.readString();
        this.ctime = in.readString();
        this.au_id = in.readInt();
        this.is_del = in.readInt();
        this.is_night = in.readInt();
        this.selected = in.readByte() != 0;
    }

    public static final Creator<RosterSelectBean> CREATOR = new Creator<RosterSelectBean>() {
        @Override
        public RosterSelectBean createFromParcel(Parcel source) {
            return new RosterSelectBean(source);
        }

        @Override
        public RosterSelectBean[] newArray(int size) {
            return new RosterSelectBean[size];
        }
    };
}
